home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Magazine / Online / QMail / source / getln.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-15  |  382 b   |  21 lines

  1. #include "substdio.h"
  2. #include "byte.h"
  3. #include "stralloc.h"
  4. #include "getln.h"
  5.  
  6. int getln(ss,sa,match,sep)
  7. register substdio *ss;
  8. register stralloc *sa;
  9. int *match;
  10. int sep;
  11. {
  12.   char *cont;
  13.   unsigned int clen;
  14.  
  15.   if (getln2(ss,sa,&cont,&clen,sep) == -1) return -1;
  16.   if (!clen) { *match = 0; return 0; }
  17.   if (!stralloc_catb(sa,cont,clen)) return -1;
  18.   *match = 1;
  19.   return 0;
  20. }
  21.